package com.example.gamestore.mapper;

import com.example.gamestore.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User login(String username);

    List<User> query();

    void updateUser(User user);

    void add(User user);

    void delete(Long id);


    User getUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);


    /*User getUserById(Long userId);*/

    int updatePassword(User user);

    User getUserById(Long id);


    void insert(User user);
}
